﻿<UserControl x:Class="TVManager.EpisodeControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:app="clr-namespace:TVManager"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Grid>
        <ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled" >
            <Grid x:Name="mainGrid" Visibility="Collapsed" AllowDrop="True" Background="White" Margin="10">
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="*" />
                </Grid.ColumnDefinitions>

                <Image x:Name="episodeImage" Grid.ColumnSpan="2" Source="{Binding ImageFileLocation}" />

                <Label Grid.Column="0" Grid.Row="3" Content="First Aired:" />
                <Label Grid.Column="0" Grid.Row="4" Content="Director:" />
                <Label Grid.Column="0" Grid.Row="5" Content="Rating:" />


                <TextBlock Grid.Column="0" Grid.Row="1" Grid.ColumnSpan="2" Text="{Binding EpisodeNameAndNumber}" VerticalAlignment="Center" FontSize="17" FontWeight="Bold" />
                <TextBlock Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" FontSize="14" Text="{Binding Path=Overview}" VerticalAlignment="Center" TextWrapping="Wrap" />
                <TextBlock Grid.Column="1" Grid.Row="3" x:Name="firstAiredTextBlock" VerticalAlignment="Center" />
                <TextBlock Grid.Column="1" Grid.Row="4" Text="{Binding Path=Person}" VerticalAlignment="Center" />
                <TextBlock Grid.Column="1" Grid.Row="5" Text="{Binding Path=Rating}" VerticalAlignment="Center" />

                <CheckBox Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="2" IsChecked="{Binding Watched}" Content="Watched" />


                <StackPanel Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="2">
                    <TextBlock Text="Episode File:" />
                    <TextBlock Text="{Binding FileLocation}" />
                    <Button x:Name="chooseFileButton" Content="Choose File" Margin="3" HorizontalAlignment="Left" />
                </StackPanel>

            </Grid>
        </ScrollViewer>
        <app:StatusControl x:Name="statusControl" />
    </Grid>
</UserControl>
